package conf


type Mongodb struct {
	Host     string 
	Port     int
	DbName   string
	Server   string
	User     string
	Password string
}

func NewMongodb(args ...interface{}) *Mongodb{

	mongodb := new(Mongodb)

	mongodb.Host   = "172.17.0.1"
	// mongodb.Host   = "127.0.0.1"
	mongodb.Port   = 27017
	mongodb.DbName = "bili-news"

	return mongodb
}

// 获取lang
func (this *Mongodb) GetDbName(lang string) string {
	if len(lang) > 0 {
		return this.DbName +"-"+ lang
	}else{
		return this.DbName
	}
}